function [ fout ] = filter_impulse( amiga_model, fin, filter_method )

fs = get_sampling_fq();
spectrum_cut = get_spectrum_cut();

if strcmpi(filter_method, 'fq')
    
    if (size(fin, 2) ~= (fs-1))
        error('full impulse required');
    end
    
    F = fft(fin);
    F = filter_fq(F);
    fout = real(ifft(F));
    
elseif strcmpi(filter_method, 'conv')
    
    k = firwin(amiga_model, fs, spectrum_cut, fin);
    fout = conv(fin, k, 'same');
else
    fout = fin;
end

end